package com.next

class Leads
{
    Double loanAmount = 0
    Double unitPrice = 0

    /** **************************************************************************************************/

    String projectName
    City city
    String district
    String address
    String floor
    String orientation = "南北"
    Double area = 0
    String building = 0
    String unit
    String totalFloor
    String roomNumber
    Integer numberOfLivingRoom = 0
    Integer numberOfReceptionRoom = 0
    HouseType houseType
    SpecialFactors specialFactors
    AssetType assetType
    Double appliedTotalPrice = 0

    /** **************************************************************************************************/

    String openId

    Date createdDate = new Date()
    Date modifiedDate = new Date()

    String externalId
    String status

    static constraints = {
        city nullable: true, blank: true
        district nullable: true, blank: true, maxSize: 32
        floor nullable: true, blank: true, maxSize: 8
        roomNumber nullable: true, blank: true, maxSize: 8
        address nullable: true, blank: true, maxSize: 256
        totalFloor nullable: true, blank: true, maxSize: 8
        unit nullable: true, blank: true, maxSize: 8
        building maxSize: 128, nullable: true, blank: true
        area nullable: true, blank: true
        orientation inList: ["东", "南", "西", "北", "东西", "南北", "东南", "东北", "西南", "西北"]
        orientation nullable: true, blank: true, maxSize: 4
        numberOfLivingRoom nullable: true, blank: true
        numberOfReceptionRoom nullable: true, blank: true
        houseType nullable: true, blank: true
        specialFactors nullable: true, blank: true
        loanAmount nullable: true, blank: true
        unitPrice nullable: true, blank: true
        assetType nullable: true, blank: true
        appliedTotalPrice nullable: true, blank: true
        externalId nullable: true, blank: true, maxSize: 32
        status inList: ['Pending', 'Completed', 'Failed']
    }
}
